#include <stdio.h>
#include <stddef.h>
#include "io_utils.h"
#include <wchar.h>
#include <locale.h>
int main() {
  char string[] = "Hello World";
  PRINTLNF("string array length: %d", sizeof(string));
  for (int i = 0; i < 12; ++i) {
    PRINT_CHAR(string[i]);
  }
  // short %hd
  // NULL \0
  PRINTLNF("%s", string);
  //11 会出问题 要 12 才正确
  //char str1[11] = "Hello World";
  //PRINTLNF("%s", str1);

  char string_zh[] = "你好，中国";
  PRINTLNF("string_zh array length: %d", sizeof(string_zh)/sizeof(char));
  PRINT_STRING(string_zh);
  wchar_t ws[] = L"你好，中国";
  PRINTLNF("ws array length: %d", sizeof(ws)/sizeof(wchar_t));
  setlocale(LC_ALL, "zh_CN.UTF-8");
  wprintf(L"ws = %ls\n",ws);
  wprintf (L"%ls \n", L"A wide string");

  char a[]={'h','e','l','l','o','\0'};
  PRINT_STRING(a);
  char b[]={"hello"};
  PRINT_STRING(b);
  //char* c={'a','b','c'};
  char* c={"abc"};
  puts(c);
  return 0;
}
